<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lacewing.multidict</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="lacewing-module.html">Package&nbsp;lacewing</a> ::
        Module&nbsp;multidict
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lacewing.multidict-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="lacewing.multidict-module.html">Module lacewing.multidict</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment"># Copyright (c) 2011 Mathias Kaerlev.</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-comment"># See LICENSE for details.</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"> </tt>
<a name="DictItem"></a><div id="DictItem-def"><a name="L4"></a><tt class="py-lineno"> 4</tt> <a class="py-toggle" href="#" id="DictItem-toggle" onclick="return toggle('DictItem');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lacewing.multidict.DictItem-class.html">DictItem</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DictItem-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="DictItem-expanded"><a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line">    <tt id="link-0" class="py-name" targets="Variable lacewing.bitdict.BitDict.keys=lacewing.bitdict.BitDict-class.html#keys,Variable lacewing.multidict.DictItem.keys=lacewing.multidict.DictItem-class.html#keys"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-0', 'keys', 'link-0');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line">    <tt id="link-1" class="py-name" targets="Variable lacewing.moo.packetloaders.message.Message.value=lacewing.moo.packetloaders.message.Message-class.html#value,Variable lacewing.multidict.DictItem.value=lacewing.multidict.DictItem-class.html#value,Variable lacewing.packetloaders.server.Response.value=lacewing.packetloaders.server.Response-class.html#value"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-1', 'value', 'link-1');">value</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line">     </tt>
<a name="DictItem.__init__"></a><div id="DictItem.__init__-def"><a name="L8"></a><tt class="py-lineno"> 8</tt> <a class="py-toggle" href="#" id="DictItem.__init__-toggle" onclick="return toggle('DictItem.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.DictItem-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">keys</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DictItem.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DictItem.__init__-expanded"><a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-2', 'keys', 'link-0');">keys</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-3', 'keys', 'link-0');">keys</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-4', 'value', 'link-1');">value</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-5', 'value', 'link-1');">value</a></tt> </tt>
</div><a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="DictItem.__str__"></a><div id="DictItem.__str__-def"><a name="L12"></a><tt class="py-lineno">12</tt> <a class="py-toggle" href="#" id="DictItem.__str__-toggle" onclick="return toggle('DictItem.__str__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.DictItem-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DictItem.__str__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DictItem.__str__-expanded"><a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-6', 'value', 'link-1');">value</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
<a name="DictItem.__repr__"></a><div id="DictItem.__repr__-def"><a name="L15"></a><tt class="py-lineno">15</tt> <a class="py-toggle" href="#" id="DictItem.__repr__-toggle" onclick="return toggle('DictItem.__repr__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.DictItem-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="DictItem.__repr__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="DictItem.__repr__-expanded"><a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-7', 'value', 'link-1');">value</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"> </tt>
<a name="MultikeyDict"></a><div id="MultikeyDict-def"><a name="L18"></a><tt class="py-lineno">18</tt> <a class="py-toggle" href="#" id="MultikeyDict-toggle" onclick="return toggle('MultikeyDict');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html">MultikeyDict</a><tt class="py-op">(</tt><tt class="py-base-class">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="MultikeyDict-expanded"><a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line">    <tt id="link-8" class="py-name" targets="Variable lacewing.multidict.MultikeyDict.items=lacewing.multidict.MultikeyDict-class.html#items,Variable lacewing.packet.items=lacewing.packet-module.html#items"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-8', 'items', 'link-8');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="MultikeyDict.__init__"></a><div id="MultikeyDict.__init__-def"><a name="L20"></a><tt class="py-lineno">20</tt> <a class="py-toggle" href="#" id="MultikeyDict.__init__-toggle" onclick="return toggle('MultikeyDict.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-param">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-param">kw</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.__init__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.__init__-expanded"><a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line">        <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method lacewing.bitdict.BitDict.__init__()=lacewing.bitdict.BitDict-class.html#__init__,Method lacewing.bytereader.ByteReader.__init__()=lacewing.bytereader.ByteReader-class.html#__init__,Method lacewing.client.ClientChannel.__init__()=lacewing.client.ClientChannel-class.html#__init__,Method lacewing.client.ClientDatagram.__init__()=lacewing.client.ClientDatagram-class.html#__init__,Method lacewing.client.Peer.__init__()=lacewing.client.Peer-class.html#__init__,Method lacewing.idpool.IDPool.__init__()=lacewing.idpool.IDPool-class.html#__init__,Method lacewing.moo.client.Channel.__init__()=lacewing.moo.client.Channel-class.html#__init__,Method lacewing.moo.client.MooClientProtocol.__init__()=lacewing.moo.client.MooClientProtocol-class.html#__init__,Method lacewing.moo.client.Player.__init__()=lacewing.moo.client.Player-class.html#__init__,Method lacewing.moo.protocol.MooProtocol.__init__()=lacewing.moo.protocol.MooProtocol-class.html#__init__,Method lacewing.moo.server.Channel.__init__()=lacewing.moo.server.Channel-class.html#__init__,Method lacewing.moo.server.MooServerFactory.__init__()=lacewing.moo.server.MooServerFactory-class.html#__init__,Method lacewing.multidict.DictItem.__init__()=lacewing.multidict.DictItem-class.html#__init__,Method lacewing.multidict.MultikeyDict.__init__()=lacewing.multidict.MultikeyDict-class.html#__init__,Method lacewing.server.ServerChannel.__init__()=lacewing.server.ServerChannel-class.html#__init__,Method lacewing.server.ServerDatagram.__init__()=lacewing.server.ServerDatagram-class.html#__init__"><a title="lacewing.bitdict.BitDict.__init__
lacewing.bytereader.ByteReader.__init__
lacewing.client.ClientChannel.__init__
lacewing.client.ClientDatagram.__init__
lacewing.client.Peer.__init__
lacewing.idpool.IDPool.__init__
lacewing.moo.client.Channel.__init__
lacewing.moo.client.MooClientProtocol.__init__
lacewing.moo.client.Player.__init__
lacewing.moo.protocol.MooProtocol.__init__
lacewing.moo.server.Channel.__init__
lacewing.moo.server.MooServerFactory.__init__
lacewing.multidict.DictItem.__init__
lacewing.multidict.MultikeyDict.__init__
lacewing.server.ServerChannel.__init__
lacewing.server.ServerDatagram.__init__" class="py-name" href="#" onclick="return doclink('link-9', '__init__', 'link-9');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-op">*</tt><tt class="py-name">arg</tt><tt class="py-op">,</tt> <tt class="py-op">**</tt><tt class="py-name">kw</tt><tt class="py-op">)</tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-10', 'items', 'link-8');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt>
</div><a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line">     </tt>
<a name="MultikeyDict.__getitem__"></a><div id="MultikeyDict.__getitem__-def"><a name="L24"></a><tt class="py-lineno">24</tt> <a class="py-toggle" href="#" id="MultikeyDict.__getitem__-toggle" onclick="return toggle('MultikeyDict.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.__getitem__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.__getitem__-expanded"><a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line">        <tt id="link-11" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-11', 'items', 'link-8');">items</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method lacewing.bitdict.BitDict.__getitem__()=lacewing.bitdict.BitDict-class.html#__getitem__,Method lacewing.multidict.MultikeyDict.__getitem__()=lacewing.multidict.MultikeyDict-class.html#__getitem__"><a title="lacewing.bitdict.BitDict.__getitem__
lacewing.multidict.MultikeyDict.__getitem__" class="py-name" href="#" onclick="return doclink('link-12', '__getitem__', 'link-12');">__getitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-13', 'value', 'link-1');">value</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt id="link-14" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-14', 'items', 'link-8');">items</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line">     </tt>
<a name="MultikeyDict.__delitem__"></a><div id="MultikeyDict.__delitem__-def"><a name="L28"></a><tt class="py-lineno">28</tt> <a class="py-toggle" href="#" id="MultikeyDict.__delitem__-toggle" onclick="return toggle('MultikeyDict.__delitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#__delitem__">__delitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.__delitem__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.__delitem__-expanded"><a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">        <tt class="py-name">item</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="lacewing.bitdict.BitDict.__getitem__
lacewing.multidict.MultikeyDict.__getitem__" class="py-name" href="#" onclick="return doclink('link-15', '__getitem__', 'link-12');">__getitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line">            <tt class="py-keyword">raise</tt> <tt class="py-name">KeyError</tt><tt class="py-op">(</tt><tt class="py-string">'cannot remove a multi item key'</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line">        <tt class="py-name">item</tt><tt class="py-op">,</tt> <tt class="py-op">=</tt> <tt class="py-name">item</tt> </tt>
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-16', 'items', 'link-8');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">itemKey</tt> <tt class="py-keyword">in</tt> <tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-17', 'keys', 'link-0');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line">            <tt class="py-name">itemList</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="lacewing.bitdict.BitDict.__getitem__
lacewing.multidict.MultikeyDict.__getitem__" class="py-name" href="#" onclick="return doclink('link-18', '__getitem__', 'link-12');">__getitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">itemKey</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">itemList</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line">                <tt class="py-name">itemList</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Method lacewing.multidict.MultikeyDict.__delitem__()=lacewing.multidict.MultikeyDict-class.html#__delitem__"><a title="lacewing.multidict.MultikeyDict.__delitem__" class="py-name" href="#" onclick="return doclink('link-19', '__delitem__', 'link-19');">__delitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">itemKey</tt><tt class="py-op">)</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line">     </tt>
<a name="MultikeyDict.__setitem__"></a><div id="MultikeyDict.__setitem__-def"><a name="L41"></a><tt class="py-lineno">41</tt> <a class="py-toggle" href="#" id="MultikeyDict.__setitem__-toggle" onclick="return toggle('MultikeyDict.__setitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#__setitem__">__setitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">keys</tt><tt class="py-op">,</tt> <tt class="py-param">value</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.__setitem__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.__setitem__-expanded"><a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line">        <tt id="link-20" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-20', 'keys', 'link-0');">keys</a></tt> <tt class="py-op">=</tt> <tt class="py-name">list</tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-21', 'keys', 'link-0');">keys</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-op">[</tt><tt id="link-22" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-22', 'value', 'link-1');">value</a></tt><tt class="py-op">]</tt> </tt>
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line">        <tt class="py-name">newItem</tt> <tt class="py-op">=</tt> <tt id="link-23" class="py-name" targets="Class lacewing.multidict.DictItem=lacewing.multidict.DictItem-class.html"><a title="lacewing.multidict.DictItem" class="py-name" href="#" onclick="return doclink('link-23', 'DictItem', 'link-23');">DictItem</a></tt><tt class="py-op">(</tt><tt id="link-24" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-24', 'keys', 'link-0');">keys</a></tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-25', 'value', 'link-1');">value</a></tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-26', 'items', 'link-8');">items</a></tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">newItem</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line">        <tt class="py-keyword">for</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt id="link-27" class="py-name"><a title="lacewing.bitdict.BitDict.keys
lacewing.multidict.DictItem.keys" class="py-name" href="#" onclick="return doclink('link-27', 'keys', 'link-0');">keys</a></tt><tt class="py-op">:</tt> </tt>
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt>
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="lacewing.bitdict.BitDict.__getitem__
lacewing.multidict.MultikeyDict.__getitem__" class="py-name" href="#" onclick="return doclink('link-28', '__getitem__', 'link-12');">__getitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">newItem</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line">            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line">                <tt class="py-name">dict</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Method lacewing.bitdict.BitDict.__setitem__()=lacewing.bitdict.BitDict-class.html#__setitem__,Method lacewing.multidict.MultikeyDict.__setitem__()=lacewing.multidict.MultikeyDict-class.html#__setitem__"><a title="lacewing.bitdict.BitDict.__setitem__
lacewing.multidict.MultikeyDict.__setitem__" class="py-name" href="#" onclick="return doclink('link-29', '__setitem__', 'link-29');">__setitem__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">key</tt><tt class="py-op">,</tt> <tt class="py-op">[</tt><tt class="py-name">newItem</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt>
</div><a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line">     </tt>
<a name="MultikeyDict.values"></a><div id="MultikeyDict.values-def"><a name="L51"></a><tt class="py-lineno">51</tt> <a class="py-toggle" href="#" id="MultikeyDict.values-toggle" onclick="return toggle('MultikeyDict.values');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#values">values</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.values-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.values-expanded"><a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">[</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-30', 'value', 'link-1');">value</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-31', 'items', 'link-8');">items</a></tt><tt class="py-op">]</tt> </tt>
</div><a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line">         </tt>
<a name="MultikeyDict.itervalues"></a><div id="MultikeyDict.itervalues-def"><a name="L54"></a><tt class="py-lineno">54</tt> <a class="py-toggle" href="#" id="MultikeyDict.itervalues-toggle" onclick="return toggle('MultikeyDict.itervalues');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#itervalues">itervalues</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.itervalues-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.itervalues-expanded"><a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-op">(</tt><tt class="py-name">item</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="lacewing.moo.packetloaders.message.Message.value
lacewing.multidict.DictItem.value
lacewing.packetloaders.server.Response.value" class="py-name" href="#" onclick="return doclink('link-32', 'value', 'link-1');">value</a></tt> <tt class="py-keyword">for</tt> <tt class="py-name">item</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-33', 'items', 'link-8');">items</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line">     </tt>
<a name="MultikeyDict.__len__"></a><div id="MultikeyDict.__len__-def"><a name="L57"></a><tt class="py-lineno">57</tt> <a class="py-toggle" href="#" id="MultikeyDict.__len__-toggle" onclick="return toggle('MultikeyDict.__len__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="lacewing.multidict.MultikeyDict-class.html#__len__">__len__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="MultikeyDict.__len__-collapsed" style="display:none;" pad="++" indent="++++++++"></div><div id="MultikeyDict.__len__-expanded"><a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="lacewing.multidict.MultikeyDict.items
lacewing.packet.items" class="py-name" href="#" onclick="return doclink('link-34', 'items', 'link-8');">items</a></tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="lacewing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://mp2.dk">Python Lacewing Library</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Dec 22 06:20:00 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
